/*SupplierInfoBase  */
import request from "/@/utils/request";
import download from "/@/utils/download.ts";

const SupplierInfoBaseApi = {

    getPageData(data: any) {
        return request({
            url: "/supplierInfoBase/pageData",
            method: "post",
            data,
        });
    },
    getDetail(data: any) {
        return request({
            url: "/supplierInfoBase/getDetail",
            method: "post",
            data,
        });
    },

    uploadExcel: (data:any)=>{
        return request({
            url: "/supplierInfoBase/importDataXls",
            method: "post",
            headersType:'multipart/form-data',
            data,
        })
        
    },

    save: (data: any) => {
        return request({
            url: "/supplierInfoBase/save",
            method: "post",
            data,
        });
    },

    del: (data: any) => {
        return request({
            url: "/supplierInfoBase/del",
            method: "post",
            data,
        });
    },

    batchSave: (data:any)=>{
        return request({
            url: "/supplierInfoBase/batchSave",
            method: "post",
            data,
        })
    },

    updateStatus: (data: any) => {
        return request({
            url: "/supplierInfoBase/updateStatus",
            method: "post",
            data,
        });
    },
    pageDataXls:(_searchParam: any,_xlsTitle: any) => {
        return request({
            url: "/supplierInfoBase/pageDataXls",
            method: "post",
            responseType: 'blob',
            headersType: 'application/json;charset=UTF-8',
            data: {
                _searchParam,_xlsTitle
            },
        }).then((res)=> {
            download(res)
        });
    },
};
export default SupplierInfoBaseApi;
